package com.huage.courseplatform.application.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huage.courseplatform.application.model.entity.PeriodStudentComment;
import com.huage.courseplatform.application.model.entity.PeriodTeacherComment;
import com.huage.courseplatform.application.model.vo.PeriodStudentCommentAndTeacherVO;
import com.huage.courseplatform.application.model.vo.PeriodTeacherCommentAndStudentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface PeriodTeacherCommentMapper extends BaseMapper<PeriodTeacherComment> {

    PeriodTeacherCommentAndStudentVO getCommentAndStudentById(String id, String userId);

    Page<PeriodTeacherCommentAndStudentVO> getCommentAndStudentPage(Page<PeriodTeacherCommentAndStudentVO> page, @Param(Constants.WRAPPER) QueryWrapper<PeriodTeacherCommentAndStudentVO> qw, @Param("userId") String UserId);

    void addLike(@Param("commentId") String commentId, @Param("userId") String userId);

    void delLike(String commentId);

}
